package com.hundsun.fcp.activity;

import android.graphics.Color;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;

import com.hundsun.fcp.R;
import com.hundsun.fcp.base.BaseActivity;
import com.hundsun.fcp.dialog.UIActionSheetDialog;
import com.hundsun.fcp.dialog.UIActionSheetDialog.OnSheetItemClickListener;
import com.hundsun.fcp.widget.EditTextWithClear;

public class MineIdAuthActivity extends BaseActivity implements OnClickListener {
	private EditTextWithClear mTrueName;
	private EditTextWithClear mIDcard;
	//上传身份证正面照片
	private View mUplodIdPicFront;
	//上传身份证反面照片
	private View mUploadIdPicBack;
	//身份证正面缩略图
	private ImageView mIdPicFront;
	//身份证反面缩略图
	private ImageView mIdPicBack;
    //提交按钮
	private Button submit;
	@Override
	protected int getContentLayout() {
		return R.layout.fcp_mine_id_auth;
	}
	@Override
	protected void initHeader() {
		super.initHeader();
		mHeaderMenu.setTitle(R.string.mine_accinfo_id_auth);
	}

	@Override
	public void initView() {
		super.initView();
		mTrueName = (EditTextWithClear) findViewById(R.id.et_truename);
		mIDcard = (EditTextWithClear) findViewById(R.id.et_idcard);
		mUplodIdPicFront = findViewById(R.id.rl_upload_idpic_front);
		mUploadIdPicBack = findViewById(R.id.rl_upload_idpic_back);
		mIdPicFront = (ImageView) findViewById(R.id.iv_idcard_front_pic);
		mIdPicBack = (ImageView) findViewById(R.id.iv_idcard_back_pic);
		
		mUplodIdPicFront.setOnClickListener(this);
		mUploadIdPicBack.setOnClickListener(this);
		
		
	}
	@Override
	public void onClick(View v) {
		if(v == mUplodIdPicFront){
			initMenu();
		}else if(v == mUploadIdPicBack){
			initMenu();
		}
	}
	/**
	 * 上传身份证底部弹出菜单
	 */
	public void initMenu() {
		final UIActionSheetDialog dialog = new UIActionSheetDialog(
				MineIdAuthActivity.this);
		dialog.addSheetItem("打开相机拍摄图片", Color.BLUE, new OnSheetItemClickListener() {
			@Override
			public void onClick() {
				// TODO Auto-generated method stub
				
			}
		});
		dialog.addSheetItem("上传本地图片", Color.BLUE, new OnSheetItemClickListener() {
			@Override
			public void onClick() {
				// TODO Auto-generated method stub
				
			}
		});
		dialog.show();

	}
	
}
